package com.annotation

import org.springframework.core.annotation.AliasFor
import org.springframework.stereotype.Component

/**
 * 数据处理标签
 */
@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
@Target(
    AnnotationTarget.FUNCTION,
    AnnotationTarget.PROPERTY_GETTER,
    AnnotationTarget.PROPERTY_SETTER,
    AnnotationTarget.ANNOTATION_CLASS
)
annotation class SocketAction(
    /** 注册的事件编号  */
    val value: Int
)


/**
 * 被绑定的类会自动被springboot扫描到
 * 并且会对该类中所有的方法进行扫描，将SocketAction添加到事件处理中
 */
@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
@Component
annotation class SocketHandler(

    /**
     * Alias for [Component.value].
     */
    @get:AliasFor(annotation = Component::class)
    val value: String = ""

)


